import DataType from 'sequelize';
import { sequelize } from '../../sequelize';
const Vlan = sequelize.define('Vlan', {

  type: {
    type: new DataType.VIRTUAL(DataType.STRING),
    get() {
      return 'VlanType';
    },
  },

  id: {
    type: DataType.BIGINT,
    primaryKey: true,
    autoIncrement: true,
  },

  number: {
    type: DataType.INTEGER,  // 1 ~ 10
  },

  name: {
    type: DataType.STRING,
  },

  wtpPort0: {
    type: DataType.INTEGER,
    defalutValue: 0,
  },

  wtpPort1: {
    type: DataType.INTEGER,
    defalutValue: 0,
  },

  wtpPort2: {
    type: DataType.INTEGER,
    defalutValue: 0,
  },

  wtpPort3: {
    type: DataType.INTEGER,
    defalutValue: 0,
  },

  wtpPort4: {
    type: DataType.INTEGER,
    defalutValue: 0,
  },

  profile_id: {
    type: DataType.INTEGER,
  }
});

export default Vlan;
